function my(method,url,params,success) {
    var xhr;
    try{
        // Firefox, Opera 8.0+, Safari
        xhr=new XMLHttpRequest();
    }catch(e){
        // Internet Explorer
        try{
            xhr=new ActiveXObject("Msxml2.XMLHTTP");
        }catch (e){
            try{
                xhr=new ActiveXObject("Microsoft.XMLHTTP");
            }catch (e){
                alert("您的浏览器不支持AJAX！");
                return false;
            }
        }
    }
    if (method=="post"||method=="POST") {
        xhr.open(method,url)
        xhr.setRequestHeader("Content-type","application/x-www-form-urlencoded")
        xhr.send(params)
    }else {
        xhr.open(method,url+"?"+params)
        xhr.send()
    }

    xhr.onreadystatechange=function () {
        if (xhr.readyState == 4 && xhr.status == 200) {
            success(xhr.responseText)
        }
    }

}